<ul>
{% regroup sidebar_menu_items by group as grouped_items %}

{% for grouped_item in grouped_items %}
  {% ifequal grouped_item.grouper 'main' %}
    {% for subitem in grouped_item.list %}
{% include 'soc/sidebar/submenu.html' %}
    {% endfor %}
  {% endifequal %}
{% endfor %}

{% for grouped_item in grouped_items %}
  {% ifnotequal grouped_item.grouper 'main' %}

{% ifequal grouped_item.grouper 'Developer'%}
	<li class="expandable-collapsed">
{% else %}
    <li class="expandable">
{% endifequal %}

    <span>{{ grouped_item.grouper }}</span>
    <ul>
      {% for subitem in grouped_item.list %}
{% include 'soc/sidebar/submenu.html' %}
      {% endfor %}
    </ul>
  </li>
  {% endifnotequal %}
{% endfor %}
</ul>
